package cn.mvc.common;

import java.util.Properties;

import org.fast.log.Logger;
import org.fast.utils.PropertiesLoader;

public class SqlMapping {

	private static Properties sql;

	static {
		sql = PropertiesLoader.load("sql.properties");
		if (sql == null) {
			Logger.getLogger(SqlMapping.class).warn(
					"未找到sql配置文件 'sql.properties'");
		}
	}

	/**
	 * 获取Sql语句
	 * 
	 * @param id
	 * @return
	 */
	public static String getSql(String id) {
		return String.valueOf(sql.getProperty(id)).trim();
	}
}
